package cn.iocoder.yudao.module.erp.controller.admin.warningrules.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.math.BigDecimal;

@Schema(description = "管理后台 - ERP 预警规则新增/修改 Request VO")
@Data
public class WarningRulesSaveReqVO {

    @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "18605")
    private Long id;

    @Schema(description = "部门id", requiredMode = Schema.RequiredMode.REQUIRED, example = "3958")
    @NotEmpty(message = "部门id不能为空")
    private String deptId;

    @Schema(description = "产品编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "24861")
    @NotNull(message = "产品编码不能为空")
    private Long productId;

    @Schema(description = "分类编码", example = "21749")
    private Long categoryId;

    @Schema(description = "分类名称", example = "张三")
    private String categoryName;

    @Schema(description = "单位编码", example = "3113")
    private Integer unitId;

    @Schema(description = "单位名称", example = "李四")
    private String unitName;

    @Schema(description = "规格")
    private String standard;

    @Schema(description = "数值类型（0整数1百分比）", example = "0")
    private Integer maxValueType;

    @Schema(description = "上限值")
    private BigDecimal maxValue;

    @Schema(description = "下限值")
    private BigDecimal minValue;

    @Schema(description = "数值类型（0整数1百分比）", example = "0")
    private Integer minValueType;

    @Schema(description = "效期预警值（天数）")
    private Integer expirydateValue;

    @Schema(description = "滞留预警值（天数）")
    private Integer detainValue;

}